class Init < ActiveRecord::Migration
  def self.up
    execute "CREATE TABLE `bugs` (
      `id` int(11) NOT NULL auto_increment,
      `number` varchar(10) NOT NULL,
      `description` text NOT NULL,
      `system_id` int(11) NOT NULL,
      `user_id` int(11) NOT NULL,
      PRIMARY KEY  (`id`),
      UNIQUE KEY `number` (`number`)
    )"
    execute "
    CREATE TABLE `systems` (
      `id` int(11) NOT NULL auto_increment,
      `name` varchar(40) NOT NULL,
      PRIMARY KEY  (`id`)
    )"
    execute "CREATE TABLE `users` (
      `id` int(11) NOT NULL auto_increment,
      `login` varchar(32) NOT NULL,
      `password` varchar(30) NOT NULL,
      `name` varchar(30) NOT NULL,
      PRIMARY KEY  (`id`)
    )"
    
  end

  def self.down
    
  end
end
